90 improve text contrast in compatibility panel #119
Merged
+359
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Several text colors in the PC builder's compatibility panel did not meet the WCAG AA contrast ratio of 4.5:1 on the
bg-surfacebackground (#485458): red-500 (2.05:1), orange-500 (2.79:1) andtext-secondary(3.62:1). The yellow and green status colors also fell short (4.10:1 and 3.53:1). This PR raises them to at least 4.5:1 while keeping the existing design.Changes
colors.css(status-incompatible,status-warning,status-unknown,status-compatible) and use them in the compatibility panel instead of Tailwind's red/orange/yellow/green 500. The four colors share the same lightness and saturation, so they look like one set, and each is at least 4.5:1 on both the surface and background colors.Contrast on #485458: incompatible 2.05 → 4.72, warning 2.71 → 4.97, unknown 4.10 → 5.13, compatible 3.53 → 5.31, secondary 3.62 → 4.70.
Related issues
Closes #90
Verification
Automated checks, run from
frontend:npx vitest runall tests passScreenshots